package com.hctforgreen.greenservice.ctr;

import android.app.Activity;
import android.content.Context;

import com.hctforgreen.greenservice.db.DbEntryAdapter;
import com.hctforgreen.greenservice.net.NetAdapter;

/**
 * NetAdapter的控制器Base基类
 * 
 * @author Tallen Zhai
 * 
 */
public class BaseController {
	protected Context context;
	protected NetAdapter mServerAdapter;
	protected DbEntryAdapter mDbEntryAdapter;

	public BaseController(DbEntryAdapter mDbEntryAdapter) {
		this.mDbEntryAdapter = mDbEntryAdapter;
	}

	public BaseController(Context context2) {
		mServerAdapter = new NetAdapter(context2);
		context = context2;
	}

	// ===============请求部分================
	/**
	 * 1、所有系列信息action
	 */
	protected final static String GET_ALL_SERIES_ACTION = "getAllSeries.do";
	/**
	 * 2、所有机型信息action
	 */
	protected final static String GET_ALL_MACHINES_ACTION = "getAllMachines.do";
	/**
	 * 3、所有资料类别信息action
	 */
	protected final static String GET_ALL_BOOK_TYPES_ACTION = "getAllBooktypes.do";
	/**
	 * 4、根据系列ID获取资料action
	 */
	@Deprecated
	protected final static String GET_BOOKS_BY_SERIES_ID_ACTION = "getBooksBySeriesId.do";
	/**
	 * 4、获取所有资料
	 */
	protected final static String GET_ALL_BOOKS_ACTION = "getAllBooks.do";
	/**
	 * XXX 5、资料下载action(拼接URL)
	 */
	protected final static String GET_BOOK_ZIP_STREAM_ACTION = "getBookZipStream.do";
	/**
	 * 6、用户登录action
	 */
	public final static String APP_LOGIN_ACTION = "appLogins.do";
	/**
	 * 用户登录新接口action
	 */
	public final static String APP_LOGIN_ACTION_NEW = "appLoginsForNew.do";
	/**
	 * 获取登陆积分
	 */

	/**
	 * 7、获取开机密码
	 */
	protected final static String GET_BOOT_PWD_ACTION = "getBootPwd.do";
	/**
	 * 获取开机备用密码
	 */
	protected final static String GET_SPARE_BOOT_PWD_ACTION = "getSpareBootPwd.do";
	/**
	 * 获取验证码(解绑)
	 */
	public final static String GET_ACCOUNT_ACTIVATE_CODE_ACTION = "getAccountActivateCode.do";
	/**
	 * 获取验证码(首次登陆)
	 */
	public final static String GET_ACTIVATE_CODE_ACTION = "getActivateCode.do";
	/**
	 * 账号解绑
	 */
	public final static String COMPARE_ACTIVATE_CODE_ACTION = "compareActivateCode.do";
	/**
	 * 信息反馈action
	 */
	@Deprecated
	protected final static String ADD_FEE_ACTION = "addFee.do";
	/**
	 * 版本控制action
	 */
	@Deprecated
	protected final static String GET_VERSION_CODE_ACTION = "versionCode.do";
	/**
	 * 8、提交文本反馈
	 */
	protected final static String SUBMIT_FEEDBACK_ACTION = "submitFeedBack.do";

	/**
	 * 提交竞品资料
	 */
	protected final static String SUBMIT_VIEINFO_ACTION = "submitVieinfo.do";

	/**
	 * 获取公开竞品资料
	 */
	protected final static String GET_VIEINFOJSONBY_PERSONID_ACTION = "getVieinfoJsonByPersonId.do";

	/**
	 * 提交章节反馈
	 */
	protected final static String SUBMIT_CHAPTER_SUGGEST_ACTION = "submitChapterSuggest.do";

	/**
	 * 提交书的意见
	 */
	protected final static String SUBMIT_BOOK_SUGGEST = "submitBookSuggest.do";

	/**
     * 
     */

	protected final static String ADD_FEEDBACK_MESSAGE_ACTION = "addFeedbackMessage.do";
	/**
	 * 获取热水机系列搭配水箱 getMachineAttr.do
	 */
	protected final static String GET_MACHINE_ATTR_ACTION = "getMachineAttr.do";
	protected final static String SUBMIT_SCORE_ACTION = "submitScore.do";

	/**
	 * 获取大机组审核状态及正常密码
	 */
	protected final static String GET_LARGEUNIT_REVIEW_STATUS_ACTION = "searchUnitInfoByPerson.do";
	/**
	 * 提交大机组信息
	 */

	protected final static String SUBMIT_LARGEUNITINFO_ACTION = "submitLargeunitInfo.do";

	/**
	 * 获取大机组提交确认完成状态
	 */

	protected final static String SUBMIT_CONFIRM_ACTION = "submitSign.do";

	/**
	 * 9、提交电话反馈
	 */
	protected final static String SUBMIT_PHONE_FEEDBACK_ACTION = "submitPhoneFeedBack.do";
	/**
	 * 10、根据用户Id获取反馈信息
	 */
	protected final static String GET_FEEDBACK_JSON_BY_PERSION_ID_ACTION = "getFeedBackJsonByPersonId.do";
	/***
	 * 获取公开案例
	 */
	protected final static String GET_OPENCASE_JSON_BY_PERSONID_ACTION = "getOpencaseJsonByPersonId.do";

	/**
	 * XXX 11、根据反馈Id和图片名称获取图片(拼接URL)
	 */
	protected final static String GET_FEEDBACK_PIC_BY_NAME_ACTION = "getFeedbackPicByName.do";
	/**
	 * 12、获取最新通知列表
	 */
	protected final static String GET_RECENT_MESSAGES_ACTION = "getRecentMessages.do";
	/**
	 * 13、获取通知列表
	 */
	protected final static String GET_MESSAGES_FROM_DATE_ACTION = "getMessagesFromDate.do";

	/**
	 * 每页列表显示的记录数
	 */
	protected final static String PAGE_SIZE = "pageSize";
	/**
	 * 第几页开始
	 */
	protected final static String PAGE_NUM = "pageNum";
	/**
	 * 14、根据通知Id获取通知详情
	 */
	protected final static String GET_MESSAGES_By_ID_ACTION = "getMessageById.do";
	/**
	 * 15、提交App反馈
	 */
	protected final static String SUBMIT_PEPORT_ACTION = "submitReport.do";
	/**
	 * 16、检查App版本
	 */
	protected final static String CHECK_VERSION_ACTION = "checkVersion.do";
	/**
	 * XXX 17、获取最新APP(拼接URL)
	 */
	@Deprecated
	protected final static String GET_NEW_APP_ACTION = "getNewApp.do";

	/**
	 * 获取Gif图片id及说明文字接口Action
	 */
	public static final String GET_LOADING_INFO_ACTION = "getLoadingInfo.do";
	/**
	 * 获取数据版本号接口Action,判断加机型或栏目
	 */
	protected static final String GET_DATA_VERSION_CODE_ACTION = "getDataVersionCode.do";
	
	/**
	 * 20160607
	 * 390694--添加
	 * 获取书籍资料版本号接口
	 */
	protected static final String GET_BOOK_DATA_VERSION_CODE_ACTION = "getBookDataVersionCode.do";
	
	/**
	 * 调试维修栏目信息
	 */
	protected final static String GET_ALL_COLUMNS_ACTION = "getAllColumns.do";
	/**
	 * 支持机型
	 */
	protected final static String GET_CONTENT_BY_INFO_TYPE_ACTION = "getContentByInfoType.do";
	/**
	 * 资料阅读统计
	 */
	protected final static String ADD_CLICK_COUNT_ACTION = "addClickCount.do";

	/**
	 * 视频播放统计
	 */
	protected final static String ADD_VIDEO_PLAY_COUNT_ACTION = "addVideoPlayCount.do";

	/**
	 * 视频下载数统计
	 */
	protected final static String ADD_VIDEO_DOWNLOAD_COUNT_ACTION = "addVideoDownloadCount.do";

	/**
	 * 获取机型对应资料阅读数
	 */
	protected final static String GET_BOOK_CLICK_ACTION = "getBookClick.do";
	/**
	 * 资料下载数统计
	 */
	protected final static String ADD_DOWNLOAD_COUNT_ACTION = "addDownloadCount.do";

	/**
	 * 提交积分
	 */
	protected final static String SUBMIT_POINT_ACTION = "submitPoint.do";

	/**
	 * 获取积分
	 */
	protected final static String GET_LOGIN_POINT = "getLoginPoint.do";

	/**
	 * 获取所有视频列表
	 */
	protected final static String GET_ALL_VIDEOS_ACTION = "getAllVideos.do";

	/**
	 * 根据类别id查看视频
	 */
	protected final static String GET_ALL_VIDEOS_BY_TYPEID_ACTION = "getAllVideosByTypeId.do";
	/**
	 * 根据关键字搜索视频
	 */
	protected final static String SEARCH_VIDEO_BY_CRITERIA_ACTION = "searchVideoByCriteria.do";
	/**
	 * 根据视频id获取视频详细信息
	 */
	protected final static String GET_VIDEO_DETAIL_BY_ID_ACTION = "getVideoDetailById.do";

	/**
	 * 派工账号验证接口
	 */
	protected final static String ASSIGN_LOGIN = "assignLogin.do";

	/**
	 * 获取开机密码的提醒和资料 getRelevanceHint()
	 */
	protected final static String GET_RELEVANCE_HINT = "getRelevanceHint.do";

	/**
	 * 获取学习资料类型 getAllStudyType
	 */
	protected final static String GET_ALL_STUDY_TYPE = "getAllStudyType.do";

	/**
	 * 获取学习资料小类型
	 */
	protected final static String GET_CHILD_TYPE_BY_TYPE_ID = "getChildTypeByTypeId.do";

	/**
	 * 获取学习资料列表
	 */
	protected final static String GET_STUDY_DATA_LIST = "getStudyDataList.do";

	/**
	 * 2016  11 24 通过id获取资料列表
	 * 获取学习资料列表
	 */
	protected final static String GET_STUDY_BY_PERSON_ID_DATA_LIST = "getStudyDataListByPersonId.do";
	/**
	 * 获取最新培训课程列表
	 */
	protected final static String GET_NEW_STUDY_DATA_LIST = "getNewStudyDataList.do";
	/**
	 * 获取资料详情
	 */
	protected final static String GET_MESSAGE_BY_ID = "getStudyDataById.do";
	/**
	 * 获取考试模块 getExamModule.do
	 */
	protected final static String GET_EXAM_MODULE = "getExamModule.do";

	/**
	 * 获取考试模块系列列表
	 */
	protected final static String GET_EXAM_SERIES = "getExamSeries.do";

	/**
	 * 试卷列表
	 */
	protected final static String GET_EXAMPAGES_LIST = "getExamPagesList.do";

	/**
	 * 试卷详情 getExamPageById.do
	 */
	protected final static String GET_EXAMPAGE_BY_ID = "getExamPageById.do";
	/**
	 * 试题列表getExamPageSub.do
	 */
	protected final static String GET_EXAM_PAGE_SUB = "getExamPageSub.do";

	/**
	 * 提交试卷
	 */
	protected final static String SUBMIT_PAGE = "submitPage.do";

	/**
	 * 获取答题记录getPersonRecord.do
	 */
	protected final static String GET_PERSON_RECORD = "getPersonRecord.do";

	/**
	 * 获取答题记录数目 getPersonRecordNum.do
	 */
	protected final static String GET_PERSON_RECORD_NUM = "getPersonRecordNum.do";

	/**
	 * 安装信息
	 */
	protected final static String GET_SETUPINFO_LIST = "getSetupInfoList.do";

	/**
	 * 培训 -- 点赞
	 */
	protected final static String SUBMIT_PRAISE = "addStudyPraiseCount.do";
	/**
	 * 培训 -- 点踩
	 */
	protected final static String SUBMIT_STEP = "addStudyStepCount.do";

}
